import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);

const state = {
    token: ''
};

const getters = {
  getToken(state) {
      return state.token;
  },
};

const mutations = {

    putToken(state,token) {
        state.token = token;
    },

    removeToken(state) {
        state.token = '';
    }
};

export default new Vuex.Store({
    state,
    getters,
    mutations,

});
